package com.nstar.carousel.mxml.impl
{
	import com.nstar.carousel.base.CarouselBaseClass;
	
	import flash.events.MouseEvent;
	
	import mx.controls.Button;
	import mx.events.FlexEvent;

	public class CarouselPic3Class extends CarouselBaseClass
	{
		public var btnPrior:Button;
		public var btnNext:Button;
		
		
		public function CarouselPic3Class()
		{
			super();
			this.addEventListener(FlexEvent.CREATION_COMPLETE,init);
		}
		
		private function init(event:FlexEvent):void{
			
			btnPrior.addEventListener(MouseEvent.CLICK,priorHandler);
			btnNext.addEventListener(MouseEvent.CLICK,nextHandler);
			imageStage.addEventListener(CarouselBaseClass.PRIOR,priorHandler);
			imageStage.addEventListener(CarouselBaseClass.NEXT,nextHandler);
		}
		
		private function priorHandler(event):void{
			this.prior();
		}
		
		private function nextHandler(event):void{
			this.next();
		}
		
	}
}